import {
	http
} from '@/utils/request/index.js'
// 线索管理相关接口

// 查询线索列表
export function getCluePage(params) {
	return http.get('/crm/clue/page', params)
}

// 查询线索详情
export function getClue(id) {
	return http.get('/crm/clue/get', { id })
}

// 新增线索
export function createClue(data) {
	return http.post('/crm/clue/create', data)
}

// 修改线索
export function updateClue(data) {
	return http.put('/crm/clue/update', data)
}

// 删除线索
export function deleteClue(id) {
	return http.delete('/crm/clue/delete', { id })
}

// 导出线索 Excel
export function exportClue(params) {
	return http.download('/crm/clue/export-excel', params)
}

// 线索转移
export function transferClue(data) {
	return http.put('/crm/clue/transfer', data)
}

// 线索转化为客户
export function transformClue(id) {
	return http.put('/crm/clue/transform', { id })
}

// 获得分配给我的、待跟进的线索数量
export function getFollowClueCount() {
	return http.get('/crm/clue/follow-count')
}